package group.sicher.common.entity;

import javax.persistence.*;
import java.util.Objects;

/**
 * @Auth rock
 * @Date 2019/7/1 21:07
 * @description
 */
@Entity
@Table(name = "wm_deliver_lincense")
public class DeliverLincenseEntity {

    private Long id;
    private Long deliverId;
    private String idcardNum;
    private String idcardImg;
    private String idcardImgBack;
    private Integer bondMoney;
    private String healthImg;
    private String images;
    private Long createAt;
    private Long updateAt;

       @Id
   @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", nullable = false)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "deliver_id", nullable = false)
    public Long getDeliverId() {
        return deliverId;
    }

    public void setDeliverId(Long deliverId) {
        this.deliverId = deliverId;
    }

    @Basic
    @Column(name = "idcard_num", nullable = true, length = 50)
    public String getIdcardNum() {
        return idcardNum;
    }

    public void setIdcardNum(String idcardNum) {
        this.idcardNum = idcardNum;
    }

    @Basic
    @Column(name = "idcard_img", nullable = true, length = 500)
    public String getIdcardImg() {
        return idcardImg;
    }

    public void setIdcardImg(String idcardImg) {
        this.idcardImg = idcardImg;
    }

    @Basic
    @Column(name = "idcard_img_back", nullable = true, length = 500)
    public String getIdcardImgBack() {
        return idcardImgBack;
    }

    public void setIdcardImgBack(String idcardImgBack) {
        this.idcardImgBack = idcardImgBack;
    }

    @Basic
    @Column(name = "bond_money", nullable = true, precision = 0)
    public Integer getBondMoney() {
        return bondMoney;
    }

    public void setBondMoney(Integer bondMoney) {
        this.bondMoney = bondMoney;
    }

    @Basic
    @Column(name = "health_img", nullable = true, length = 500)
    public String getHealthImg() {
        return healthImg;
    }

    public void setHealthImg(String healthImg) {
        this.healthImg = healthImg;
    }

    @Basic
    @Column(name = "images", nullable = true, length = 500)
    public String getImages() {
        return images;
    }

    public void setImages(String images) {
        this.images = images;
    }

    @Basic
    @Column(name = "create_at", nullable = true)
    public Long getCreateAt() {
        return createAt;
    }

    public void setCreateAt(Long createAt) {
        this.createAt = createAt;
    }

    @Basic
    @Column(name = "update_at", nullable = true)
    public Long getUpdateAt() {
        return updateAt;
    }

    public void setUpdateAt(Long updateAt) {
        this.updateAt = updateAt;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DeliverLincenseEntity that = (DeliverLincenseEntity) o;
        return id == that.id &&
                deliverId == that.deliverId &&
                Objects.equals(idcardNum, that.idcardNum) &&
                Objects.equals(idcardImg, that.idcardImg) &&
                Objects.equals(idcardImgBack, that.idcardImgBack) &&
                Objects.equals(bondMoney, that.bondMoney) &&
                Objects.equals(healthImg, that.healthImg) &&
                Objects.equals(images, that.images) &&
                Objects.equals(createAt, that.createAt) &&
                Objects.equals(updateAt, that.updateAt);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, deliverId, idcardNum, idcardImg, idcardImgBack, bondMoney, healthImg, images, createAt, updateAt);
    }
}
